home *** CD-ROM | disk | FTP | other *** search
/ Hot Super Models / Hot Super Models.iso / unix / x11 / xv2r1.tar / xv2r1 / extensions / xv / include / Xvlib.h < prev    next >
C/C++ Source or Header  |  1991-06-26  |  8KB  |  296 lines

  1. /***********************************************************
  2. Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
  3. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  4.  
  5.                         All Rights Reserved
  6.  
  7. Permission to use, copy, modify, and distribute this software and its 
  8. documentation for any purpose and without fee is hereby granted, 
  9. provided that the above copyright notice appear in all copies and that
  10. both that copyright notice and this permission notice appear in 
  11. supporting documentation, and that the names of Digital or MIT not be
  12. used in advertising or publicity pertaining to distribution of the
  13. software without specific, written prior permission.  
  14.  
  15. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  16. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  17. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  18. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  19. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  20. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21. SOFTWARE.
  22.  
  23. ******************************************************************/
  24. #ifndef XVLIB_H
  25. #define XVLIB_H
  26. /*
  27. ** File: 
  28. **
  29. **   Xvlib.h --- Xv library public header file
  30. **
  31. ** Author: 
  32. **
  33. **   David Carver (Digital Workstation Engineering/Project Athena)
  34. **
  35. ** Revisions:
  36. **
  37. **   26.06.91 Carver
  38. **     - changed XvFreeAdaptors to XvFreeAdaptorInfo
  39. **     - changed XvFreeEncodings to XvFreeEncodingInfo
  40. **
  41. **   11.06.91 Carver
  42. **     - changed SetPortControl to SetPortAttribute
  43. **     - changed GetPortControl to GetPortAttribute
  44. **     - changed QueryBestSize
  45. **
  46. **   05.15.91 Carver
  47. **     - version 2.0 upgrade
  48. **
  49. **   01.24.91 Carver
  50. **     - version 1.4 upgrade
  51. **
  52. */
  53.  
  54. #include <X11/extensions/Xv.h>
  55.  
  56. typedef struct {
  57.   int numerator;
  58.   int denominator;
  59. } XvRational;
  60.  
  61. typedef struct {
  62.   XvEncodingID encoding_id;
  63.   char *name;
  64.   unsigned long width;
  65.   unsigned long height;
  66.   XvRational rate;
  67.   unsigned long num_encodings;
  68. } XvEncodingInfo;
  69.  
  70. typedef struct {
  71.   char depth;
  72.   unsigned long visual_id;
  73. } XvFormat;
  74.  
  75. typedef struct {
  76.   XvPortID base_id;
  77.   unsigned long num_ports;
  78.   char type;
  79.   char *name;
  80.   unsigned long num_formats;
  81.   XvFormat *formats;
  82.   unsigned long num_adaptors;
  83. } XvAdaptorInfo;
  84.  
  85. typedef struct {
  86.   int type;
  87.   unsigned long serial;       /* # of last request processed by server */
  88.   Bool send_event;       /* true if this came from a SendEvent request */
  89.   Display *display;       /* Display the event was read from */
  90.   Drawable drawable;       /* drawable */
  91.   unsigned long reason;    /* what generated this event */
  92.   XvPortID port_id;        /* what port */
  93.   Time time;           /* milliseconds */
  94. } XvVideoNotifyEvent;
  95.  
  96. typedef struct {
  97.   int type;
  98.   unsigned long serial;       /* # of last request processed by server */
  99.   Bool send_event;       /* true if this came from a SendEvent request */
  100.   Display *display;       /* Display the event was read from */
  101.   XvPortID port_id;        /* what port */
  102.   Time time;           /* milliseconds */
  103.   Atom attribute;           /* atom that identifies attribute */
  104.   long value;              /* value of attribute */
  105. } XvPortNotifyEvent;
  106.  
  107. typedef union {
  108.   int type;
  109.   XvVideoNotifyEvent xvvideo;
  110.   XvPortNotifyEvent xvport;
  111.   long pad[24];
  112. } XvEvent;
  113.  
  114. extern int XvQueryExtension(
  115. #if NeedFunctionPrototypes
  116.   Display*                 /* display */,
  117.   unsigned int*            /* p_version */,
  118.   unsigned int*            /* p_revision */,
  119.   unsigned int*            /* p_requestBase */,
  120.   unsigned int*            /* p_eventBase */, 
  121.   unsigned int*            /* p_errorBase */
  122. #endif
  123. );
  124.  
  125. extern int XvQueryAdaptors(
  126. #if NeedFunctionPrototypes
  127.   Display*                 /* display */,
  128.   Window                   /* window */,
  129.   unsigned int*            /* p_nAdaptors */,
  130.   XvAdaptorInfo**          /* p_pAdaptors */
  131. #endif
  132. );
  133.  
  134. extern int XvQueryEncodings(
  135. #if NeedFunctionPrototypes
  136.   Display*                 /* display */,
  137.   XvPortID                 /* port */,
  138.   unsigned int*            /* p_nEncoding */,
  139.   XvEncodingInfo**         /* p_pEncoding */
  140. #endif
  141. );
  142.  
  143. extern int XvPutVideo(
  144. #if NeedFunctionPrototypes
  145.   Display*                 /* display */,
  146.   XvPortID                 /* port */,
  147.   Drawable                 /* d */,
  148.   GC                       /* gc */,
  149.   int                      /* vx */, 
  150.   int                      /* vy */,
  151.   unsigned int             /* vw */, 
  152.   unsigned int             /* vh */,
  153.   int                      /* dx */, 
  154.   int                      /* dy */,
  155.   unsigned int             /* dw */,
  156.   unsigned int             /* dh */
  157. #endif
  158. );
  159.  
  160. extern int XvPutStill(
  161. #if NeedFunctionPrototypes
  162.   Display*                 /* display */,
  163.   XvPortID                 /* port */,
  164.   Drawable                 /* d */,
  165.   GC                       /* gc */,
  166.   int                      /* vx */, 
  167.   int                      /* vy */,
  168.   unsigned int             /* vw */, 
  169.   unsigned int             /* vh */,
  170.   int                      /* dx */, 
  171.   int                      /* dy */,
  172.   unsigned int             /* dw */,
  173.   unsigned int             /* dh */
  174. #endif
  175. );
  176.  
  177. extern int XvGetVideo(
  178. #if NeedFunctionPrototypes
  179.   Display*                 /* display */,
  180.   XvPortID                 /* port */,
  181.   Drawable                 /* d */,
  182.   GC                       /* gc */,
  183.   int                      /* vx */, 
  184.   int                      /* vy */,
  185.   unsigned int             /* vw */, 
  186.   unsigned int             /* vh */,
  187.   int                      /* dx */, 
  188.   int                      /* dy */,
  189.   unsigned int             /* dw */,
  190.   unsigned int             /* dh */
  191. #endif
  192. );
  193.  
  194. extern int XvGetStill(
  195. #if NeedFunctionPrototypes
  196.   Display*                 /* display */,
  197.   XvPortID                 /* port */,
  198.   Drawable                 /* d */,
  199.   GC                       /* gc */,
  200.   int                      /* vx */, 
  201.   int                      /* vy */,
  202.   unsigned int             /* vw */, 
  203.   unsigned int             /* vh */,
  204.   int                      /* dx */, 
  205.   int                      /* dy */,
  206.   unsigned int             /* dw */,
  207.   unsigned int             /* dh */
  208. #endif
  209. );
  210.  
  211. extern int XvStopVideo(
  212. #if NeedFunctionPrototypes
  213.   Display*                /* display */,
  214.   XvPortID                /* port */,
  215.   Drawable                /* drawable */
  216. #endif
  217. );
  218.  
  219. extern int XvGrabPort(
  220. #if NeedFunctionPrototypes
  221.   Display*                /* display */,
  222.   XvPortID                /* port */,
  223.   Time                    /* time */
  224. #endif
  225. );
  226.  
  227. extern int XvUngrabPort(
  228. #if NeedFunctionPrototypes
  229.   Display*                /* display */,
  230.   XvPortID                /* port */,
  231.   Time                    /* time */
  232. #endif
  233. );
  234.  
  235. extern int XvSelectVideoNotify(
  236. #if NeedFunctionPrototypes
  237.   Display*                /* display */,
  238.   Drawable                /* drawable */,
  239.   Bool                    /* onoff */
  240. #endif
  241. );
  242.  
  243. extern int XvSelectPortNotify(
  244. #if NeedFunctionPrototypes
  245.   Display*                /* display */,
  246.   XvPortID                /* port */,
  247.   Bool                    /* onoff */
  248. #endif
  249. );
  250.  
  251. extern int XvSetPortAttribute(
  252. #if NeedFunctionPrototypes
  253.   Display*                /* display */,
  254.   XvPortID                /* port */,
  255.   Atom                    /* attribute */,
  256.   int                     /* value */
  257. #endif
  258. );
  259.  
  260. extern int XvGetPortAttribute(
  261. #if NeedFunctionPrototypes
  262.   Display*                /* display */,
  263.   XvPortID                /* port */,
  264.   Atom                    /* attribute */,
  265.   int*                    /* p_value */
  266. #endif
  267. );
  268.  
  269. extern int XvQueryBestSize(
  270. #if NeedFunctionPrototypes
  271.   Display*                /* display */,
  272.   XvPortID                /* port */,
  273.   Bool                    /* motion */,
  274.   unsigned int            /* vid_w */, 
  275.   unsigned int            /* vid_h */,
  276.   unsigned int            /* drw_w */, 
  277.   unsigned int            /* drw_h */,
  278.   unsigned int*           /* p_actual_width */, 
  279.   unsigned int*           /* p_actual_width */
  280. #endif
  281. );
  282.  
  283. extern void XvFreeAdaptorInfo(
  284. #if NeedFunctionPrototypes
  285.   XvAdaptorInfo*          /* adaptors */
  286. #endif
  287. );
  288.  
  289. extern void XvFreeEncodingInfo(
  290. #if NeedFunctionPrototypes
  291.   XvEncodingInfo*         /* encodings */
  292. #endif
  293. );
  294.  
  295. #endif XVLIB_H
  296.